﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using HousingInfo.Library;

namespace WebHousingInfo.Controls
{
    public partial class ManagerUser_Right : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["UserName"] == null)
                    Response.Redirect("DangNhap.aspx");
                GettotalNewsBussiness();
            }
        }

        public void GettotalNewsBussiness()
        {
            lblchoduyet_bussiness.Text = "[" + NewsBussinessBOList.GetType_NewsBussinessBOList_ByUserName(Session["UserName"].ToString(), false, false, true, false).Count.ToString() + "]";
            lbldangdang_bussiness.Text = "[" + NewsBussinessBOList.GetType_NewsBussinessBOList_ByUserName(Session["UserName"].ToString(), false, true, false, false).Count.ToString() + "]";
            lblhethan_bussiness.Text = "[" + NewsBussinessBOList.GetType_NewsBussinessBOList_ByUserName(Session["UserName"].ToString(), false, false, false, true).Count.ToString() + "]";
            lbltatca_bussiness.Text = "[" + NewsBussinessBOList.GetType_NewsBussinessBOList_ByUserName(Session["UserName"].ToString(), true, false, false, false).Count.ToString() + "]";

            lbltatcavanban.Text = "[" + TextHouseBOList.GetTextHouse_ByUser(Session["UserName"].ToString(),"tatca").Count.ToString() + "]";
            lblvanbandangdang.Text = "[" + TextHouseBOList.GetTextHouse_ByUser(Session["UserName"].ToString(),"dangdang").Count.ToString() + "]";
            lblvanbanchoduyet.Text = "[" + TextHouseBOList.GetTextHouse_ByUser(Session["UserName"].ToString(),"choduyet").Count.ToString() + "]";
            
        }
    }
}